package com.toe.pojo.entity.commodity;

import java.math.BigDecimal;

import com.baomidou.mybatisplus.annotation.*;

import java.util.Date;

import java.io.Serializable;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;

/**
 * <p>
 * 
 * </p>
 *
 * @author 陶涛
 * @since 2022-07-19
 */
@Data
@EqualsAndHashCode(callSuper = false)
@ApiModel(value="CommodityGoods对象", description="")
public class CommodityGoods implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "商品id")
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    @ApiModelProperty(value = "商品标题")
    private String title;

    @ApiModelProperty(value = "商品简介")
    private String introduce;

    @ApiModelProperty(value = "商品类型,对应类型表的id")
    private Long typeId;

    @ApiModelProperty(value = "商品封面图片")
    private String cover;

    @ApiModelProperty(value = "提供商品的商家id")
    private Long businessId;

    @ApiModelProperty(value = "商品的销量")
    private Integer sales;

    @ApiModelProperty(value = "商品库存数量")
    private Integer stock;

    @ApiModelProperty(value = "创建时间")
    @TableField(fill = FieldFill.INSERT)
    private Date createTime;

    @ApiModelProperty(value = "修改时间")
    @TableField(fill = FieldFill.UPDATE)
    private Date updateTime;

    @TableLogic
    @TableField(select = false)
    private Integer deleted;

}
